package com.i8office.android.zhihuixinwu.module.contract;

import com.cyan.tools.base.BasePresenter;
import com.cyan.tools.base.BaseView;
import com.cyan.tools.callback.RequestCallback;
import com.cyan.tools.callback.SimpleCallback;
import com.i8office.android.zhihuixinwu.bean.Code;
import com.i8office.android.zhihuixinwu.bean.Empl;
import com.i8office.android.zhihuixinwu.ui.schedule.CheckInGroup;
import com.i8office.android.zhihuixinwu.ui.schedule.DayItem;
import com.i8office.android.zhihuixinwu.ui.schedule.EventItem;
import com.i8office.android.zhihuixinwu.ui.schedule.LeaderData;
import com.i8office.android.zhihuixinwu.ui.schedule.Meetting;
import com.i8office.android.zhihuixinwu.ui.schedule.ScheduleData;

import java.util.List;
import java.util.Map;

import io.reactivex.disposables.Disposable;

/**
 * Created by pc on 2018/7/8.
 */

public interface CalendarContract {
    interface Model {
        Disposable getCalendarData(RequestCallback<List<DayItem>> callback, Map<String, String> params);

        Disposable getEventsByDate(RequestCallback<List<EventItem>> callback, Map<String, String> params);

        Disposable getScheduleList(RequestCallback<List<EventItem>> callback, Map<String, String> params);

        Disposable getLeaderScheduleByName(RequestCallback<ScheduleData> callback, Map<String, String> params);

        Disposable getLeaderScheduleByDate(RequestCallback<ScheduleData> callback, Map<String, String> params);

        Disposable removeEvent(RequestCallback<Code> callback, Map<String, String> params);

        Disposable addEvent(RequestCallback<Code> callback, Map<String, String> params);

        Disposable updateEvent(RequestCallback<Code> callback, Map<String, String> params);

        Disposable updateOtherEvent(RequestCallback<Code> callback, Map<String, String> params);

        Disposable getLeadersData(RequestCallback<LeaderData> callback);

        Disposable getGroupLeadersData(RequestCallback<LeaderData> callback);

        Disposable getMeettings(RequestCallback<List<Meetting>> callback, Map<String, String> params);

        Disposable checkInGroup(RequestCallback<CheckInGroup> callback);
    }

    interface SchedulePresenter extends BasePresenter {
        void checkInGroup();
    }

    interface ScheduleView extends BaseView {
        void showCheckInGroup(CheckInGroup checkInGroup);

    }

    interface AddEventPresenter extends BasePresenter {
        void addEvent(Map<String, String> params);

        void updateEvent(Map<String, String> params);

        void updateOtherEvent(Map<String, String> params);

        void removeEvent(String taskID, String leaderId);
    }

    interface AddEventView extends BaseView {
        void addSuccess();

        void deleteSuccess();
    }

    interface SelfCalendarSettingPresenter extends BasePresenter {
        void getCalendarData(int year, int month);

        void getEventsByDate(int year, int month, int day);

        void removeEvent(String taskID);
    }


    interface SelfCalendarSettingView extends BaseView {
        void showCalendarData(List<DayItem> data);

        void showEventData(List<EventItem> data);

        void deleteSuccess();
    }

    interface ScheduleListPresenter extends BasePresenter {
        void getScheduleList(String date, int goTowards, boolean isRefersh);

        void removeEvent(EventItem item);
    }

    interface ScheduleListView extends BaseView {
        void showEventData(boolean isRefresh, List<EventItem> data);

        void deleteSuccess(EventItem item);
    }

    interface LeaderCalendarSettingPresenter extends BasePresenter {
        void getLeadersData();

        void getCalendarData(String leaderId, int year, int month);

        void getEventsByDate(String leaderId, int year, int month, int day);

        void removeEvent(String taskID, String leaderId);
    }

    interface LeaderCalendarSettingView extends SelfCalendarSettingView {
        void showLeadersData(List<LeaderData.LeaderBean> data);
    }

    interface ChooseLeaderView extends BaseView {
        void showLeadersData(List<LeaderData.LeaderBean> data);
    }

    interface ChooseLeaderPresenter extends BasePresenter {
        void getLeadersData();
    }


    interface ChooseMeettingView extends BaseView {
        void showMeettings(List<Meetting> data);
    }

    interface ChooseMeettingPresenter extends BasePresenter {
        void getMeettings(String date, String emplId);
    }


    interface LeaderScheduleByNamePresenter extends BasePresenter {
        void getGroupLeaderData();

        void getLeaderScheduleByName(String uid, String date, String dateOfCurrentMonday);
    }

    interface LeaderScheduleByNameView extends BaseView {
        void showGroupLeaderData(List<LeaderData.LeaderBean> leaderData);

        void showLeaderScheduleByName(ScheduleData scheduleData);
    }

    interface LeaderScheduleByDatePresenter extends BasePresenter {
        void getLeaderScheduleByDate(String date, String dateOfCurrentMonday);
    }


    interface LeaderScheduleByDateView extends BaseView {
        void showLeaderScheduleByDate(ScheduleData scheduleData);
    }
}
